<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/work_today.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/tips.js"></script>
    <script src="${staticServer}/js/web/consultant_client_tracking_list.js?1.0"></script>

    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>
    <script>
        var contextPath = '${contextPath}';

        $(function () {
            $("#good_type").val(${good_name_id});
            $("#audit_status").val(${auditStatus});

        });

        function submit() {
            var goodsId = $("#good_type option:selected").val();
            var audit_status = $("#audit_status option:selected").val();
            window.location.href = "${contextPath}/goods/procurementAuditList.htm?good_name_id=" + goodsId + "&audit_status=" + audit_status;
        }
        function viewProcess(id, apply_status) {
            window.location.href = "${contextPath}/goods/viewProcess.htm?id=" + id + "&apply_status=" + apply_status;
        }
        function audit(id) {
            window.location.href = "${contextPath}/goods/toReceiveGoodsView.htm?id=" + id;

        }
    </script>

</head>

<body>
<input type="hidden" id="traId" value="">
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>采购管理</li>
        <li>&gt;</li>
        <li class="current">中心分配</li>
    </ul>
</div>
<div id="container">
    <div id="title">采购审核</div>
    <table class="simple_table" rel="nohover" style="min-width: 750px;">
    <#--	<tr>
                <td >
              	<input type="button" value=" 查 询 " onclick="submit()" />
				</td>
			</tr>-->
    </table>
    <table>
        <tr class="fields">
            <th width="150">办公地址</th>
            <th width="100">物品分类</th>
            <th width="100">物品名称</th>
            <th width="100">物品数量</th>
            <th width="100">物品单价</th>
            <th width="100">总额</th>
            <th width="100">物品单位:</th>
            <th width="100">物品类型</th>
            <th width="100">状态</th>
            <th width="100">备注</th>
            <th width="100">操作</th>
            <th width="100">流程</th>
        </tr>
    <#if list??>
        <#list list as list>
            <tr class="even_row">
                <td align="center">${list.center_name}</td>
                <td align="center">${list.tg_goods_name}</td>
                <td align="center">${list.item_name}</td>
                <td align="center">${list.number}</td>
                <td align="center">${list.unit_price}</td>
                <td align="center">${list.total_calculation}</td>
                <td align="center">${list.company}</td>
                <td align="center">${list.type}</td>
                <td align="center">
                    <#if list.apply_status=="1">
                        未领取
                    <#elseif list.apply_status=="2">
                        已领取
                    </#if>
                </td>
                <td>
                    <a title="${list.msg}">
                        <em class="caption"></em>
                        <#if list.msg?length gt 6>${list.msg?substring(0,5)}...<#else>${list.msg}</#if>
                    </a>
                </td>
                <td align="center">
                    <#if list.apply_status=="1" >
                        <a a href="javascript:void(0)" onclick="audit('${list.id}')">领取</a>
                    </#if>

                </td>
                <td align="center"><a href="javascript:void(0)"
                                      onclick="viewProcess('${list.id}','${list.apply_status}')">查看</a></td>
            </tr>
        </#list>
    </#if>

    </table>
</div>

<div id="pager">
    <ul id="pagination" style="padding-left: 14px">
    <#if page??>
        <#if page.pagetotal?? && page.pagetotal!="0">
            <#assign pagetotal = page.pagetotal>
        <#else>
            <#assign pagetotal = 1>
        </#if>
        <#if page.currpage??>
            <#assign currpage = page.currpage>
        <#else>
            <#assign currpage = 1>
        </#if>
        <#if currpage==1 >
            <li class="previous-off">首页</li>
            <li class="previous-off">上一页</li>
        <#else>
            <li class="previous"><a
                    href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=1">首页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${currpage-1}">上一页</a>
            </li>
        </#if>
        <input type="hidden" id="total" value="${page.pagetotal}"/>
        <#if pagetotal<=11>
            <#list 1..pagetotal as index_up>
                <#if currpage==index_up >
                    <li class="current">${index_up}</li>
                <#else>
                    <li>
                        <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${index_up}">${index_up}</a>
                    </li>
                </#if>
            </#list>
        <#else>
            <#if currpage<=8 >
                <#list 1..9 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${pagetotal}">${pagetotal}</a>
                </li>

            <#elseif (currpage>= 9 && currpage<pagetotal-7)  >
                <li>
                    <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&currPage=1">1</a>
                </li>
                <li>...</li>
                <#list currpage-3..currpage+3 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&currPage=${pagetotal}">${pagetotal}</a>
                </li>
            <#else>
                <li>
                    <a href="${contextPath}/goods/procurementAuditList.htm?currPage=1&good_name_id=${good_name_id}&audit_status=${auditStatus}">1</a>
                </li>
                <li>...</li>
                <#list pagetotal-8..pagetotal as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
            </#if>
        </#if>
        <#if currpage==pagetotal >
            <li class="previous-off">下一页</li>
            <li class="previous-off">尾页</li>
        <#else>
            <li class="previous"><a
                    href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${currpage+1}">下一页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/procurementAuditList.htm?&good_name_id=${good_name_id}&audit_status=${auditStatus}&currPage=${page.pagetotal}">尾页</a>
            </li>
        </#if>
        <li class="previous"></li>
        <li class="pageinfo">共${page.total}条记录</li>
    </#if>
    </ul>
</div>

<div class="emptyline"></div>
</body>
</html>